package com.example.demo.pojo.tree;

import com.example.demo.pojo.entity.SubjectFile;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 题目文件树
 * @author 21172
 */
@Getter
public class TreeSubjectFile {
    SubjectFile subjectFile;
    List<TreeSubjectFile>children=new ArrayList<>();

    public void initSubjectFile(SubjectFile subjectFile){
        this.subjectFile = subjectFile;
    }
    public void addChild(TreeSubjectFile child){
        if(child!=null){
            this.children.add(child);
        }
    }

}
